abstract class FruitDecorator extends Fruit {
    protected Fruit decoratedFruit;

    public FruitDecorator(Fruit fruit) {
        this.decoratedFruit = fruit;
    }

    @Override
    public abstract void eat();
}

// 具体装饰器1：清洗装饰
class WashedFruit extends FruitDecorator {
    public WashedFruit(Fruit fruit) {
        super(fruit);
    }

    @Override
    public void eat() {
        wash();
        decoratedFruit.eat();
    }

    private void wash() {
        System.out.println("Washing " + decoratedFruit.getClass().getSimpleName());
    }
}

// 具体装饰器2：削皮装饰
class PeeledFruit extends FruitDecorator {
    public PeeledFruit(Fruit fruit) {
        super(fruit);
    }

    @Override
    public void eat() {
        peel();
        decoratedFruit.eat();
    }

    private void peel() {
        System.out.println("Peeling " + decoratedFruit.getClass().getSimpleName());
    }
}